//
// Copyright (c) 2009-2011, chunquedong
//
// This file is part of ChunMap project
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
//
// History:
//   2011-05-03  Jed Young  Creation
//

using chunmapModel
using slanData

**
** Shape is a feature with geometry
**
mixin Shape : Feature
{
  abstract Geometry geometry()
  abstract Obj? get(Int i)
}

**
** ShapeFeature
**
@Js
class ShapeFeature : Record, Shape
{
  override Obj? id
  override Envelope envelope() { geometry.envelope }

  override Geometry geometry

  new make(Schema s, Obj? values, |This| f) : super(s, values)
  {
    f(this)
  }
}